import instance from "@/request/request";
import type { Res } from '@/request/ResultApi';

//获取所有操作日志
export const getAllOperationlog = (size: number, current: number,OperatorId:number,operatorType:number,timeOrderBy:number): Res<null> =>{
    let str=""
    if(operatorType!=-1)str+='&operatorType='+operatorType
    if(OperatorId>=0)str+='&OperatorId='+OperatorId
    str+='&timeOrderBy='+timeOrderBy
    return instance.get(`/operationlog/all?size=${size}&current=${current}${str}`);
}

//删除操作日志
export const removeOperationlog = (operatorId: number): Res<null> =>
    instance.post(`/operationlog/delete?operatorId=${operatorId}`);

//批量删除操作日志
export const removeOperationlogs = (data: []): Res<null> => instance.post("/operationlog/deletes", data);
